package ${packageUri}.web.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zhcs.assistant.mapper.${className}Mapper;
import com.zhcs.assistant.pojo.entity.${className};

import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
* @ClassName ${className}Service
* @Description ${className}Service
* @Author duqc
* @Date ${time}
**/
@Slf4j
@Service
@RequiredArgsConstructor
public class ${className}Service extends ServiceImpl<${className}Mapper, ${className}> {


    /**
    * 新增
    *
    * @param ${className?uncap_first}Insert 数据
    * @param operatorType    operatorType
    */
    @Transactional(rollbackFor = Exception.class)
    public void insert(${className}Insert ${className?uncap_first}Insert, String operatorType) {

    }

    /**
    * 修改
    *
    * @param ${className?uncap_first}Update 修改数据
    */
    @Transactional(rollbackFor = Exception.class)
    public void update(${className}Update ${className?uncap_first}Update) {

    }

    /**
    * 列表查询
    *
    * @param pageQuery 查询条件
    * @return IPage
    */
    public IPage<${className}VO> queryPage(${className}Query pageQuery) {
        return null;
    }

    /**
    * 查询详情
    *
    * @param id id
    * @return ${className}VO
    */
    public ${className}VO info(Long id) {
       if (null == id) {
           throw new CustomException(StatusEnum.PARAMS_INVALID);
       }
       return null;
    }

    /**
    * 删除
    *
    * @param id ID
    */
    @Transactional(rollbackFor = Exception.class)
    public void delete(Long id) {
        if (null == id) {
            throw new CustomException(StatusEnum.PARAMS_INVALID);
        }
    }

}
